package com.example.takeaway.converter;

import com.example.takeaway.model.bo.Dish;
import com.example.takeaway.model.dto.DishDTO;
import com.example.takeaway.model.dto.DishEditorDTO;
import com.example.takeaway.model.vo.DishVO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author 邢晨旭
 * {@code @date} 2023/10/15
 */
@Mapper(componentModel = "spring")
public interface DishConverter {

    Dish toDish(DishDTO dto);
    Dish toDish(DishEditorDTO dto);

    DishVO toDishVO(Dish dish);
    List<DishVO> toDishVO(List<Dish> dish);
}
